# Contributor: Peter Mack <peter@linmob.net>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=maui
pkgname=mauikit-archiver
pkgver=4.0.0
pkgrel=0
pkgdesc="MauiKit QtQuick plugin for online archived/compressed files management"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://mauikit.org/"
license="GPL-2.0-or-later"
depends="kirigami"
depends_dev="
	mauikit-dev
	mauikit-filebrowsing-dev
	qt6-qtbase-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	samurai
	"
_repo_url="https://invent.kde.org/maui/mauikit-archiver.git"
source="https://download.kde.org/stable/maui/mauikit-archiver/$pkgver/mauikit-archiver-$pkgver.tar.xz"
subpackages="$pkgname-dev"
options="!check" # no tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
	# Workaround https://invent.kde.org/maui/index-fm/-/issues/76
	sed -e '/prefer/d' -i "$pkgdir"/usr/lib/qt6/qml/org/mauikit/archiver/qmldir
}

sha512sums="
ad2045c1f99f9db2365c249a3c026c4ab5e3a1cd18801c8708326718fed98e4e143e609d9cb812b49b3e71191e771439c04eacfb8fc0561998a037b1682be9a7  mauikit-archiver-4.0.0.tar.xz
"
